<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>登录成功</title>
<style>
body{font-family:Arial,Helvetica,sans-serif;background:#f2f2f2;display:flex;height:100vh;align-items:center;justify-content:center}
.card{background:#fff;padding:40px 50px;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.15);text-align:center}
h2{color:#333;margin-bottom:10px}
p{color:#666}
a{color:#007bff;text-decoration:none}
a:hover{text-decoration:underline}
</style>
</head>
<body>
<div class="card">
  <h2>登录成功！</h2>
  <p>欢迎 <strong id="user"></strong> 进入系统</p>
  <p><a href="/">返回首页</a> | <a href="#" onclick="logout()">退出登录</a></p>
</div>

<script>
// 把用户名从 URL 参数里读出来并显示
const params = new URLSearchParams(location.search);
document.getElementById('user').textContent = params.get('user') || '游客';

function logout(){
  // 简单做法：清掉 cookie / token 再跳回登录页
  document.cookie = 'token=; Max-Age=0; path=/';   // 视你的凭证名而定
  location.href = '/login.html';
}
</script>
</body>
</html>
